﻿using System;

using SBPweb.Accelerators.StreetView.Client.BingMapsProvider.Models;

namespace SBPweb.Accelerators.StreetView.Client.BingMapsProvider.Controllers
{

    public class MapViewController : ControllerBase
    {

        #region Constructor logic

        #endregion

        #region Property accessors

        public static IMapViewer Model
        {
            get
            {
                return FetchModel();
            }
        }

        #endregion

        #region Methods

        public static IMapViewer FetchModel()
        {
            IMapViewer mapViewer = FetchModel<IMapViewer>();
            if (mapViewer == null)
            {
                mapViewer = new MapViewerModel();
                RegisterModel(mapViewer);
            }
            return mapViewer;
        }

        public static void RegisterModel(IMapViewer model)
        {
            RegisterModel<IMapViewer>(model);
        }

        #endregion

    }

}